package hospital.service;

import hospital.model.hosp.Schedule;
import hospital.model.hosp.ScheduleJson;
import hospital.vo.hosp.ScheduleOrderVo;
import org.springframework.data.domain.Page;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @author
 * @description:
 */

public interface ScheduleService {
    @Transactional
    //保存或者修改排班方法
    void saveOrUpdate(Map<String, Object> parameterMap);

    //得到排班的信息
    Page<Schedule> findSchedule(Map<String, Object> parameterMap);
    @Transactional
    //根据hoscode hosScheduleId 删除科室信息
    void removeSchedule(Map<String, Object> parameterMap);

    //通过医院编号hoscode和科室编号depcode获取排班规则数据
    Map<String, Object> getScheduleRule(Integer page, Integer limit, String hoscode, String depcode);

    //根据医院编号hoscode 科室编号depcode 工作日期workDate查询出排班的详情
    List<Schedule> getDetailSchedule(String hoscode, String depcode, String workDate);

    //获取可预约排班数据
    Map<String, Object> getBookingSchedule(Integer page, Integer limit, String hoscode, String depcode);


    //根据排班的id，获取排班的详情
    Schedule getSchedule(String scheduleId);

    //根据排班的 hosScheduleId ,获取排班的详情
    Schedule getScheduleReceiver(String hosScheduleId);
    //根据排班id获取预约下单数据
    ScheduleOrderVo getScheduleOrderVo(String scheduleId);
    @Transactional
    //更新排班的数据 rabbitmq
    void updateSchedule(Schedule schedule);

    // 自动生成排班接口
    public  List<ScheduleJson> getAllSchedule(String hoscode);
}
